import java.rmi.*;
import java.rmi.server.*;

/**
 *
 * @author ulan
 */

public class RMIDegInftImpl extends UnicastRemoteObject implements RMIDegIntf{

    RMIDegInftImpl() throws RemoteException {
        
    }
    
    /**
     * @author ulan
     * @param result Nilai suhu yang akan dikonversi.
     * @return Hasil konversi.
     */
    @Override
    public double celToFah(double result) throws RemoteException {
        return result = (result * 1.8) + 32;
        
    }

    @Override
    public double celToKel(double result) throws RemoteException {
        return result += 273.15;
        
    }

    @Override
    public double fahToCel(double result) throws RemoteException {
        return result = (result - 32) / 1.8;
        
    }

    @Override
    public double fahToKel(double result) throws RemoteException {
        return result = (result + 459.67) / 1.8;
        
    }

    @Override
    public double kelToCel(double result) throws RemoteException {
        return result -= 273.15;
                
    }

    @Override
    public double kelToFah(double result) throws RemoteException {
        return result = result * 1.8 - 459.67;
                
    }
    
}
